/**
 * Created by Dzl on 2017-2-15.
 */

var schedule = require('node-schedule');

// var date = new Date('2017-02-15 16:41');
//
// var j = schedule.scheduleJob(date, function () {
//     console.log('执行任务');
// });
//
//
// var rule = new schedule.RecurrenceRule();
// rule.second = 3;
// var b = schedule.scheduleJob(rule, function () {
//     console.log('每3秒钟执行一次任务 at ' + new Date().getTime());
// });

schedule.scheduleJob('1 * * * *', function () {
     console.log('每1秒钟执行一次任务 at ' + new Date().getTime());
});
